﻿<div class="widget">
    <div class="widget-header">
        <h3><i class="fa fa-edit"></i> 入库登记查看</h3>
    </div>
    <div class="widget-content">
        <form class="form-horizontal" role="form">
            <div class="form-group green">
                <label class="col-sm-2 control-label text-right">查看单据：</label>
                <div class="col-sm-4 text-left">
                    <label class="control-label">{{data.receiptNumber}}</label>
                </div>
            </div>
            <fieldset ng-if="!!data">
                <legend>基本信息</legend>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">客户编号：</label>
                    <div class="col-sm-4">
                        <label class="control-label">
                            <a href="javascript:void(0);" ng-click="btnOpenDetail(data.customerNumber,'customerdetail')">{{data.customerNumber}}</a>
                        </label>
                    </div>
                    <label class="col-sm-2 control-label text-right">客户标示：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.receiveIdentity}}</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">收货仓库：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.warehouseName}}</label>
                    </div>
                    <label class="col-sm-2 control-label text-right">创建日期：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.editdate | date:'MM/dd/yyyy HH:mm:ss'}}</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">入库状态：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.warehouseName}}</label>
                    </div>
                    <label class="col-sm-2 control-label text-right">入库日期：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.indate | date:'MM/dd/yyyy HH:mm:ss'}}</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">架位信息：</label>
                    <div class="col-sm-4">
                        <div class="row">
                            <div class="col-sm-4" ng-repeat="item in data.shelfDetails">
                                <label class="control-label">
                                <a href="javascript:void(0)" ng-click="linkToShelfDetail(item)" >{{item.shelfNumber}} x {{data.itemCount}}</a>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
            </fieldset>
            <fieldset ng-if="!!data">
                <legend>收货明细</legend>
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th>商品编号</th>
                            <th>UPC</th>
                            <th>品牌</th>
                            <th>商品描述</th>
                            <th>属性1</th>
                            <th>属性2</th>
                            <th>数量</th>
                            <th ng-show="data.sendType == 1">寄送数量</th>
                            <th ng-show="data.sendType == 1">收货数量</th>
                            <th ng-show="data.sendType == 2">单件重量（磅）</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="item in data.items">
                            <td>{{item.itemNumber}}</td>
                            <td>{{item.upccode}}</td>
                            <td>{{item.brand}}</td>
                            <td>{{item.description}}</td>
                            <td><span ng-show="item.properties[0]">{{item.properties[0].propertyName + ': ' + item.properties[0].propertyValue}}</span></td>
                            <td><span ng-show="item.properties[1]">{{item.properties[1].propertyName + ': ' + item.properties[1].propertyValue}}</span></td>
                            <td>{{item.sendCount}}</td>
                            <td ng-show="data.sendType == 1">{{item.sendCount}}</td>
                            <td ng-show="data.sendType == 1">{{item.receiptCount}}</td>
                            <td ng-show="data.sendType == 2">{{item.weight}}</td>
                            <td style="vertical-align: middle;">
                                <a href="javascript:void(0)" ng-click="btnPrint(item)" ng-show="data.sendType == 1">打印清单标签</a><!-- 寄送库存 -->
                                <a href="javascript:void(0)" ng-click="btnPrint(item)" ng-show="data.sendType == 2">打印入库标签</a><!-- 海淘包裹 -->
                            </td>
                        </tr>
                    </tbody>
                </table>
            </fieldset>
            <div class="form-group" ng-if="!!data">
                <label class="col-sm-2 control-label text-right">收货备注：</label>
                <div class="col-sm-6">
                    <textarea class="form-control" ng-model="data.memo" ng-disabled="true"></textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12 text-center">
                    <button type="button" class="btn btn-default" ng-click="btnPrev()"><i class="fa fa-reply"></i>返回</button>
                </div>
            </div>
        </form>
    </div>
    <print-helper></print-helper>
</div>